Blockchain based secure software updates for IoT devices

ABSTRACT

Methods and systems for provable, auditable and secure software updates for resource-constrained IoT devices are provided via a security framework and a protocol for owner-controlled software updates for IoT devices through blockchain.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No. 17/328,126 filed May 24, 2021, which is incorporated herein by reference. U.S. patent application Ser. No. 17/328,126 claims priority from U.S. Provisional Patent Application 63/031,887 filed May 29, 2020, which is incorporated herein by reference.

FIELD OF THE INVENTION

This invention relates to methods and systems for provable and secure software updates for resource-constrained IoT devices.

BACKGROUND OF THE INVENTION

With a large number of connected Internet of Things (IoT) devices deployed across the world, they have become popular targets of malicious attacks, raising great security challenges. Manufacturers are making great efforts to keep the software on these devices up-to-date to protect the security of these IoT devices.

However, the software update process itself may also be manipulated by attackers, such as a roll-back attack and replay message attack. Cryptography-based solutions may effectively defend against such attacks. However, as many IoT devices are resource-constrained devices, they cannot afford the high resource requirements and heavy computation overhead caused by Cryptography based security solutions. Thus, the problem of securing resource-constrained IoT devices has yet to be solved.

In addition, in regulated environments (like healthcare, automotive industry, etc.) the ability to audit software updates and prove a device is updated is critical. For example, automotive companies must prove that they serviced recalled vehicles. “Servicing” a vehicle in many cases is performed through a software update. Record and proof of the update must be kept by the manufacturer.

The present invention addresses these problems and needs in the art.

SUMMARY OF THE INVENTION Terminology & Definitions

-   -   Blockchain is a graph of nodes that are connected to each other.         The nodes hold records of data that are public or private. The         blockchain can execute computer instructions upon the data and         transactions within the network. The nodes are linked together         by using cryptographic hashes. The blockchain is distributed         across multiple computers and remained in synchronization with         others through a consensus algorithm.     -   Smart Contract is a software algorithm implemented an algorithm         that is executed as an indivisible atomic transaction on the         blockchain.     -   SHA3 is a type of cryptographic hash. A cryptographic hash is an         algorithm that takes input data arbitrarily large in size and         outputs a fixed size (often much smaller) specific string of         text. If the data is altered in any way, the string of text (the         hash) is also changed in a way that is both one-way and         collision-free. In other words, that hash mathematically         uniquely identifies that data.     -   ECDSA is an elliptic curve digital signature algorithm, which is         a cryptographic algorithm that produces a digital signature         based on a piece of data. The digital signature of the data is         used by the receiver of the data to mathematically prove that         the sender is the specific sender that signed the data. The key         advantage of ECDSA is that the size of the signature is smaller         than many other signature algorithms while maintaining an         equivalent or better level of security.     -   Asymmetric Cryptography is a cryptographic technique to exchange         a message on a public communication mechanism (like the         Internet) using a public-key such that only the intended         receiver who has their own personal private-key can decrypt the         message.     -   Symmetric Cryptography is a cryptographic technique to encrypt a         message using a key shared between two parties. The encrypted         message can only be decrypted using the shared key.     -   Manufacturer (M) is the company, vendor, or business that         manufactures and produces the IoT device. The manufacturers         range in size from large to small and may or may not be         independent of each other. The following notation is used:         M={m1, m2, . . . , mn} where mi∈M, i∈Z+, n≥1.     -   Software Update (B) is the software update payload (often a         binary file) that is transferred to the device. The software         update can either be an initial installation of a piece of         software or a revision to existing software on the IoT device.         The following notation is used: B={b₁, b₂, . . . , b_(n)} where         b_(j)∈B, j∈Z+, n≥1.     -   Header (h_(j)) is the first n-bytes of the software update         (b_(j)) that contains information on the manufacturer, version,         and other meta-data related to the software release. h_(j) is         part of b_(j).     -   Blockchain payload nodes (P) are the nodes in the blockchain         service update requests process that are paid a fee for hosting         and serving the payload (B). These nodes detect and verify the         software update version. They maintain the blockchain public         ledger. They are paid a fee for their services. The following         notation is used: P={p₁, p₂, . . . , p_(n)} where p_(k)∈P, k∈Z+,         n≥1.     -   Transaction (Tx) represents the transaction record (number j) in         the public ledger of the blockchain specifying a specific         software update transaction. Tx_(j) where j∈Z+, n≥1.     -   Owner (O) is the consumer, individual, person, or potentially a         client-company who owns and/or manages 1, 2, . . . , n IoT         devices. The following notation is used: O={o₁, o₂, . . . ,         o_(n)} where o_(l)∈O, l∈Z+, n≥1.     -   IoT Device (D) is an IoT device. Examples of IoT devices range         are sensors, a smart-light bulb, smart-TV, phone, to an IoT         device in a vehicle. The set of devices are explicitly         heterogeneous and resource-constrained. D={_(d11), d₁₂, . . . ,         d_(n1), d_(nm)} where d_(il)∈D, i∈Z+, l∈Z+, n≥1, m≥1 with         i∈{manufacturers} and l∈{owners}.

The present invention provides a method for updating software between a manufacturer and Internet of Things (IoT) devices of consumers using a blockchain. A software update is encrypted and stored on a Cloud. The Cloud is defined as storage accessible over the Internet. The encrypting and storing is performed by the manufacturer. It is noted that the method applies to software updating to existing software, but also to initial or new software.

The manufacturer notifies one or more owners regarding the availability of the software update for their respective IoT devices. One or more owners submit a payment for the software update. This payment transaction is performed via a software-coded secure transaction mechanism on the blockchain. As defined herein supra, a blockchain is defined as a distributed electronic database containing transactions records accessible over an Internet, whereby the transactions records stored on the blockchain are unchangeable upon creation of the transactions records, and whereby the unchangeability upon creation is enforced through cryptography.

The encryption keys for the software update are created and then encrypted. The encrypted encryption keys are stored on the blockchain, not the software update itself. Encrypting the encryption key is important because the blockchain's ledger is public. So, if the encryption keys were not encrypted then any node in the blockchain network could decrypt and access the software update. So, the confidentiality of the encryption keys is important for software security. This technique allows the encryption keys to be part of the blockchain while remaining secure and confidential.

On the blockchain the following items are stored:

-   -   the encryption of the encryption keys,     -   an address of the stored and encrypted software update; and     -   a signature of the manufacturer;

Access information is released to the one or more owners, after successful and verified payment, regarding at least one of:

-   -   the encryption of the encryption keys,     -   the address of the stored and encrypted software update; and/or     -   the signature of the manufacturer;

With the access information and from the respective IoT device the blockchain is accessed for:

-   -   the encryption of the encryption keys,     -   the address of the stored and encrypted software update; and/or     -   the signature of the manufacturer;

The stored and encrypted software update is downloaded from the Cloud onto the respective IoT device(s). The downloaded software update is decrypted and installed on the respective IoT device(s). The step of installing the software updates the blockchain by creating an install transaction record on the blockchain. On the blockchain, a recording of the install transaction is performed and the install transaction record is encrypted making the install transaction record unchangeable.

The method could further include the step of the manufacturer auditing the software update of the IoT device by accessing the unchangeable install transaction record on the blockchain. Likewise, the method could further include the step of one or more owners auditing the software update of the IoT device by accessing the unchangeable install transaction record on the blockchain.

Advantages

Embodiments of the invention have the following advantages:

-   -   The usage of smart contracts to deliver software is a novel         concept, where the most promising aspect is the potential for         the contract to provide auditing capabilities for software         updates. In these smart contract transactions, the owner of the         device is required to approve transactions. This blockchain         provides immutable proof of a software update taking place.     -   Higher availability than traditional client-server architectures         is provided through blockchain (encryption keys) and the cloud         (encrypted software update storage).     -   Verifiable payment for software is supported through a smart         contract. Payment in exchange for software keys is an atomic and         indivisible operation unlike with traditional credit cards or         other financial software purchases.     -   ECDSA signature protects software update supply chain attacks by         ensuring the software update comes from the manufacturer.     -   Software integrity (inability to insert malware into software)         is maintained through SHA3 cryptographic hash.     -   Software delivery and installation can be accurately audited         through the ledger of the blockchain.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows according to an exemplary embodiment of the invention an overview of Framework Data Flow and Components.

FIG. 2 shows according to an exemplary embodiment of the invention an algorithmic process for the protocol step-by-step. FIG. 2 of the drawings in U.S. Provisional Patent Application 63/031,887, filed May 29, 2020, to which this application claims priority, and which is incorporated herein by reference, the reader will be able to see the same process with the additions of the steps in the figures. The text of the steps is removed from FIG. 2 for clarity and compliance in this application, but each of the steps is described in the text infra.

DETAILED DESCRIPTION

The objective of the present invention is to provide methods and systems for provable and secure software updates for resource-constrained IoT devices. Accordingly, the inventors provide this via a security framework and a protocol for owner-controlled software updates for IoT devices through blockchain.

The following aspects are key objectives/aspects of the invention. Embodiments of the invention:

-   -   Categorize software updates to clearly identify the purpose of         the update (security update, feature update, bug fix update,         performance improvement).     -   Leverage blockchains to provide a secure updating process while         not generating overhead for IoT devices.     -   Provide auditing (via blockchain) of the software updates for         both the manufacturer and the owner of IoT devices.     -   Use smart contracts to ensure the delivery of the software and         financial transaction of fees and payment.     -   Are suitable for securing resource-constrained (low CPU, low         power, low internet connectivity) IoT devices with limited         overhead.     -   Offload higher CPU blockchain operations to the owner's device         and to the blockchain itself.

Protocol Algorithm

FIG. 1 shows an overview of Framework Data Flow and Components. FIG. 2 shows the Algorithmic Process for the protocol step-by-step. Embodiments of the invention ensure secure software that maintains fundamental security concepts of confidentiality, integrity, availability, authenticity, and accountability. The protocol is designed to ensure several key functionalities that do not currently exist. The ordering of the steps is essential to its security.

The algorithm lends itself to parallelization. Several steps can be run at the same time without dependency on their ordering while also maintaining security. Current techniques are end-to-end sequential in nature.

The smart contract creates a secure platform to guarantee payment of software and also the delivery of the software keys. Software that is paid for also has guaranteed delivery.

Security

Security of the software update is covered in terms of confidentiality through encryption of the software update, and keys sent through blockchain to the owner. The key setup process exchanges keys for communication using an asymmetric cryptosystem defined as {KeyGen_(a)(λ), E_(a)(χ,k),D_(a)(c,k)}.

-   -   KeyGen generates a key.     -   E_(a) is the asymmetric encryption algorithm.     -   D_(a) is an asymmetric decryption algorithm.     -   λ is the security parameter     -   χ is the message (the software update b_(j) or other data)     -   c is the encrypted message     -   k is a key

Cryptosystems require input parameters which are a public key PK and a private (secret key) SK. The manufacturer and owner of the IoT devices create their key pairs to communicate securely between the manufacturer (PK_(mi), SK_(mi)) and the owner (PK_(ol), SK_(ol)). For this invention, this same methodology is used to establish a shared secret key between owner and manufacturer. The delivery of the keys through blockchain and the security of the framework algorithm is one of the innovations here.

For the purposes of this invention, the software update b_(j) for the device is encrypted using symmetric encryption E_(s) using a key k_(bj). The key k_(bj) itself is encrypted by E_(a)(k_(b),PK_(ol)) by the manufacturer using the public key PK_(ol) of the owner and sent to the blockchain. Thus, the integrity of both the key k_(b) and the software update b_(j) is guaranteed. The key k_(bj) and contents of the software update b_(j) cannot be opened and cannot be changed.

The integrity of the software update remains unaltered during communication. It is ensured through the use of cryptographic hashing. The cryptographic hash hEbj of the encrypted software update is sent to the blockchain as part of the update message (um). The cryptographic hash in one implementation could use the SHA3 algorithm, however is not limited to this specific algorithm.

The update message is described as um=UID∥hEbj∥Ea(k_(bj), PK_(ol)). The UID contains the version number of the software update. This prevents a rollback or roll forward attack. A rollback/forward attack is when an attacker pushes forward a valid software update to a less secure version of the software to enable a device to be attacked through known insecurities.

Posting software updates using the steps in the invention through blockchain and cloud allows sensitive information to not have to be installed on an IoT device when it is manufactured. Installing information on a device during manufacturing is a common, but insecure practice for many current point-of-sale IoT devices at cash registers.

To prevent impersonation attacks where a malicious actor impersonates a device's true manufacturer, embodiments of this invention leveraged a digital signature using ECDSA (elliptic curve digital signature algorithm) as it is both a secure and space-efficient algorithm for digital signatures.

Through these methods, the security of the software update for the IoT devices is maintained.

Auditability

The permanent and public record of the blockchain is leveraged for providing records that can be audited by the owner to know what versions of software are updated on which IoT devices. Moreover, the manufacturer can tell which devices are updated to better understand the security of the devices it has produced. This is particularly important in regulated environments (medical, automotive, power/electric) where individual safety is at risk.

Auditability is accomplished in step 14 (FIG. 2 ) by sending the software update installation parameters to the blockchain to enable the manufacturer and the owner to permit audits. The proof of installation is recorded as E(i∥j∥o∥l, PKi)∥E(i∥j∥o∥l, PKol).

Smart Contract and Financial Transaction

Smart contracts are software-implemented algorithms that describe an indivisible atomic transaction on the blockchain. The smart contract algorithm ensures the delivery of fees for the software and also the installation of the software on the device. The smart contracts guarantee that both monies are paid and the software is delivered. The blockchain nodes are also incentivized for servicing the software update through smart contracts. In addition, the performance of our smart contracts is highly efficient as they use hashmaps providing O(1) (constant) computational time complexity.

Common IoT Attack Prevention

There are several common attacks against software updates and IoT devices that are prevented by the embodiments of the invention. Roll-back and roll-forward attacks are prevented by version information and by checking encrypted manifest information delivered to the owner. Replay message attacks by which malicious attackers replay valid messages are prevented through the framework's use of ECDSA signature algorithms. Malicious updates (altered updates) are prevented through confidentiality of encryption of data held in cloud and hashing algorithm to verify the integrity of the software. Sybil attack is defined by incentivization of blockchain nodes to grow a long highly secure blockchain. Denial-of-Service attack is prevented by protocol and IoT device maintaining valid and correct software updates.

The Protocol defines 14 steps achieving the objective describes infra. Specifically, these steps are:

-   Step 1: Manufacturer m_(i) notifies owner o_(i) of a new software     update. -   Step 2: Owner o_(i) accepts/approves the software update to occur. -   Step 3: Manufacturer m_(i) uploads the symmetrically encrypted     software update E_(s)(b_(j),k_(b)) to the cloud C. Symmetrical     encryption is indicated by E_(s). -   Step 4: Manufacturer m_(i) sends the smart contract to the     blockchain payload node p_(k). -   Step 5: The blockchain payload node p_(k) issues a request to the     owner o_(l) account for payment. -   Step 6: The owner o_(l) account satisfies payment and pays the fee     for the blockchain payload node p_(k). -   Step 7: The blockchain payload node p_(k) collects their fee and     sends payment to the manufacturer m_(i). -   Step 8A: Manufacturer m_(i) uploads the update message “um” which is     composed of UID (uniquely identifies the manfacturer), and SHA3 hash     h_(Ebj) of the software update, and the asymmetrically encrypted     keys E_(a)(k_(bj), PK_(ol)). E_(a) indicates asymmetric encryption.     k_(bj) is the encryption keys. PK_(ol) is the public key of the     owner. -   Step 8B: Manufacturer m_(i) uploads the ECDSA signature σ indicated     of the update message “um” to the blockchain. -   Step 9: Queries a blockchain payload node p_(k) for the software     update. -   Step 10A: The blockchain payload node p_(k) sends the update     message. -   Step 10B: The blockchain payload node p_(k) sends the ECDSA     signature σ to the owner o_(l), -   Step 10C: The owner o_(l) requests the encrypted software update     file from the cloud C. -   Step 11: The owner o_(l) downloads the encrypted software update     from the cloud C -   Step 12: The owner o_(l) computes the SHA3 hash and compared it to     h_(Ebj). If the hashes match, the owner decrypts the encrypted     software update and sends the software update b_(j) and the UID to     the device d_(il). -   Step 13: The device d_(ij) notifies the owner o_(l) of the software     installation completion. -   Step 14: The owner o_(l) notified the payload node p_(k) that the     software installation occurred which is encrypted and recorded on     the blockchain E_(a)(i∥j∥o∥l, PK_(i))∥E_(a)(i∥j∥o∥l,PK_(ol)). This     enables the manufacturer or owner to later perform an audit. 

What is claimed is:
 1. A method for updating software between a manufacturer and Internet of Things (IoT) devices of owners using a blockchain, comprising: (a) creating encryption keys for a software update and then further creating an encryption of the encryption keys; (b) storing on the blockchain: (p) the encryption of the encryption keys, (pp) an address of the encrypted software update; (ppp) a signature of a manufacturer, wherein the blockchain is defined as a distributed electronic database containing transaction records accessible over an Internet; (c) from an IoT device accessing the blockchain for (p), (pp) and (ppp); and (d) decrypting and installing the software update on the IoT device, wherein the installing updates the blockchain by creating an install transaction record on the blockchain, record the install transaction and encrypt the install transaction record making the install transaction record unchangeable.
 2. The method as set forth in claim 1, further comprising encrypting the software update and storing the encrypted software update on a Cloud, wherein the Cloud is defined as a storage accessible over the Internet, and wherein the encrypting and storing is performed by the manufacturer.
 3. The method as set forth in claim 1, further comprising the manufacturer notifying one or more owners regarding an availability of the software update for their respective IoT devices.
 4. The method as set forth in claim 1, the one or more owners submitting a payment for the software update, wherein the payment transaction is via a software-coded secure transaction mechanism on the blockchain, wherein the transactions records stored on the blockchain are unchangeable upon creation of the transaction records, and wherein the unchangeability upon creation is enforced through cryptography.
 5. The method as set forth in claim 4, further comprising the manufacturer auditing the software update of the IoT device by accessing the unchangeable install transaction record on the blockchain.
 6. The method as set forth in claim 4, further comprising the one or more owners auditing the software update of the IoT device by accessing the unchangeable install transaction record on the blockchain. 